package de.deilab.prefgen.example;

import java.util.Collection;
import java.util.LinkedList;

import de.dailab.prefgen.ObjectAnnotations.ValueDescription;
import de.dailab.prefgen.ObjectAnnotations.ValueLimitations;

public class News {

	private Collection<Sport> sportNewsList = new LinkedList<Sport>();
	enum UPDATE_INTERVAL {
		DAILY, HOURLY, ALLWAYS
	}
	
	enum BOOLEAN {
		yes, no
	}
	
	private UPDATE_INTERVAL updateInterval;
	
	private int rateService;
	
	@ValueDescription("A list of Sports")
	public Collection<Sport> getSportNewsList() {
		return sportNewsList;
	}

	public void addSportNews(Sport sportNews) {
		this.sportNewsList.add(sportNews);
	}

	@ValueDescription("How often to pool for the news.")
	public UPDATE_INTERVAL getUpdateInterval() {
		return updateInterval;
	}

	public void setUpdateInterval(UPDATE_INTERVAL updateInterval) {
		this.updateInterval = updateInterval;
	}

	@ValueLimitations(max=25, min=1)
	@ValueDescription("Rate the Service")
	public int getRateService() {
		return rateService;
	}

	public void setRateService(int rateService) {
		this.rateService = rateService;
	}

	private BOOLEAN newsletter;

	@ValueDescription("Do you like to subscribe a newsletter?")
	public BOOLEAN getNewsletter() {
		return newsletter;
	}

	public void setNewsletter(BOOLEAN newsletter) {
		this.newsletter = newsletter;
	}
	
	
}
